//--------------------------------------------------------------------------------
// This file is a portion of the D2D1Renderer.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Mirco Timmermann
//
//--------------------------------------------------------------------------------
#pragma once

#ifndef _D2_DOCUMENT_H
#define _D2_DOCUMENT_H

#include "..\components\TextBox.h"
#include "..\components\containers\ScrollBarContainer.h"


using namespace D2;

class Document : public D2::ScrollBarContainer {

public:
	Document(int x, int y, int width, int height);
	~Document(void);

private:
	TextBox* _textBox;

public:
	void AppendText(std::string text);
	void SetWriteable(bool enable);

private:
	void ON_TOTAL_WIDTH_CHANGED_textBox(const Event &event);
	void ON_TOTAL_HEIGHT_CHANGED_textBox(const Event &event);

};

#endif